package com.cvo.scrumtoolkit.client.pannels.widgets;

import com.cvo.scrumtoolkit.client.entities.BacklogItem;
import com.cvo.scrumtoolkit.client.entities.WorkItem;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class SprintBacklogWidget extends Composite {

	private static SprintBacklogWidgetUiBinder uiBinder = GWT
			.create(SprintBacklogWidgetUiBinder.class);
	private BacklogItem bl;

	interface SprintBacklogWidgetUiBinder extends
			UiBinder<Widget, SprintBacklogWidget> {
	}
	@UiField
	Label backlogItem;
	@UiField
	VerticalPanel workItemContainer;
	
	
	public SprintBacklogWidget(BacklogItem bl) {
		initWidget(uiBinder.createAndBindUi(this));
		this.bl= bl;
		backlogItem.setText(bl.getBacklogItem().getBacklogItemName());
		//Nog geen linked list in backlogitems
		/*	for (WorkItem w:bl.getWorkItems()){
			workItemContainer.add(new WorkItemWidget(w));
			
		}*/
		
	}
	

}
